.container {
  padding: 0;
  background: linear-gradient(135deg, #f6f9fc 0%, #f1f4f9 100%);
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;

  :global {
    .ant-pro-page-container {
      height: 100%;
    }

    .ant-space {
      width: 100%;
    }

    .ant-layout-content {
      padding: 0 !important;
    }

    .ant-pro-page-container-children-container {
      padding: 0;
    }
  }
}

.searchBar {
  margin-bottom: 32px;
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: slideDown 0.5s ease-out;
  width: 100%;

  .filters {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .filterTag {
    cursor: pointer;
    transition: all 0.3s;

    &:hover {
      transform: translateY(-2px);
    }
  }
}

.categorySection {
  margin-bottom: 40px;
  animation: fadeInUp 0.6s ease-out;
  width: 100%;

  h3 {
    position: relative;
    padding-left: 16px;
    margin-bottom: 24px;
    color: #2c3e50;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    &::before {
      content: '';
      position: absolute;
      left: 0;
      top: 15%;
      height: 70%;
      width: 4px;
      background: linear-gradient(to bottom, #3498db, #2980b9);
      border-radius: 2px;
    }

    .categoryCount {
      font-size: 14px;
      color: #7f8c8d;
      font-weight: normal;
    }
  }

  .cardGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    width: 100%;
  }

  @media (max-width: 768px) {
    .cardGrid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 480px) {
    .cardGrid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

.card {
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 8px;
  background: white;
  position: relative;
  border: 1px solid #edf2f7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #3498db;

    .imageContainer img {
      transform: scale(1.05);
    }

    .linkIcon {
      opacity: 1;
      transform: translateX(0);
    }
  }
}

.cardContent {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;

}

.imageContainer {
  width: 100%;
  height: 140px;
  background: #f8fafc;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #edf2f7;

  img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
  }
}

.textContent {
  padding: 12px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.title {
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1.4;
  margin-bottom: 4px;
  width: 100%;

  .linkIcon {
    font-size: 14px;
    color: #3498db;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    flex-shrink: 0;
    margin-left: 8px;
  }
}

.description {
  color: #718096;
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  width: 100%;
}

.tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: white;
  background: #3498db;
}

.stats {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-top: auto;
  width: 100%;

  .statItem {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #a0aec0;
    font-size: 12px;

    .anticon {
      font-size: 14px;
    }

    &.favorite {
      cursor: pointer;
      transition: all 0.3s;
      padding: 4px 8px;
      border-radius: 4px;
      margin-left: auto;

      &:hover {
        color: #e74c3c;
      }

      &.active {
        color: #e74c3c;
      }
    }
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
